package com.heima.homeservicemanagementsystem.openfeign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description
 * @Author jcf
 * @Date 2025/3/11
 */
@FeignClient(name = "github-oauth", url = "https://github.com")
public interface GithubOauthClient {

    @PostMapping(value = "/login/oauth/access_token", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    String getAccessToken(@RequestParam("client_id") String clientId,
                          @RequestParam("client_secret") String clientSecret,
                          @RequestParam("code") String code,
                          @RequestParam("redirect_uri") String redirectUri);
}

